var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, i) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var i in e)
              Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
          })(e, i);
      };
      return function (e, i) {
        function n() {
          this.constructor = e;
        }
        if ("function" != typeof i && null !== i)
          throw new TypeError(
            "Class extends value " + String(i) + " is not a constructor or null"
          );
        t(e, i),
          (e.prototype =
            null === i
              ? Object.create(i)
              : ((n.prototype = i.prototype), new n()));
      };
    })(),
  TextInputEx = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        e.on(Laya.Event.FOCUS, e, e.onFocus),
        e.on(Laya.Event.BLUR, e, e.onBlur),
        e
      );
    }
    return (
      __extends(e, t),
      (e.prototype.onFocus = function () {
        this.initText ||
          ((this.initText = this.textField.text),
          (this.initColor = this.textField.color)),
          this.textField.text == this.initText &&
            ((this.textField.text = ""),
            (this.textField.color = "#999999"),
            (this.textField.italic = !1));
      }),
      (e.prototype.onBlur = function () {
        "" == this.textField.text && (this.textField.text = this.initText),
          this.textField.text == this.initText &&
            ((this.textField.color = this.initColor),
            (this.textField.italic = !0));
      }),
      e
    );
  })(Laya.TextInput);
